package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PmsPurchaseMapper;
import com.ruoyi.system.domain.PmsPurchase;
import com.ruoyi.system.service.IPmsPurchaseService;

/**
 * 采购单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-15
 */
@Service
public class PmsPurchaseServiceImpl implements IPmsPurchaseService 
{
    @Autowired
    private PmsPurchaseMapper pmsPurchaseMapper;

    /**
     * 查询采购单
     * 
     * @param id 采购单主键
     * @return 采购单
     */
    @Override
    public PmsPurchase selectPmsPurchaseById(Long id)
    {
        return pmsPurchaseMapper.selectPmsPurchaseById(id);
    }

    /**
     * 查询采购单列表
     * 
     * @param pmsPurchase 采购单
     * @return 采购单
     */
    @Override
    public List<PmsPurchase> selectPmsPurchaseList(PmsPurchase pmsPurchase)
    {
        return pmsPurchaseMapper.selectPmsPurchaseList(pmsPurchase);
    }

    /**
     * 新增采购单
     * 
     * @param pmsPurchase 采购单
     * @return 结果
     */
    @Override
    public int insertPmsPurchase(PmsPurchase pmsPurchase)
    {
        return pmsPurchaseMapper.insertPmsPurchase(pmsPurchase);
    }

    /**
     * 修改采购单
     * 
     * @param pmsPurchase 采购单
     * @return 结果
     */
    @Override
    public int updatePmsPurchase(PmsPurchase pmsPurchase)
    {
        return pmsPurchaseMapper.updatePmsPurchase(pmsPurchase);
    }

    /**
     * 批量删除采购单
     * 
     * @param ids 需要删除的采购单主键
     * @return 结果
     */
    @Override
    public int deletePmsPurchaseByIds(Long[] ids)
    {
        return pmsPurchaseMapper.deletePmsPurchaseByIds(ids);
    }

    /**
     * 删除采购单信息
     * 
     * @param id 采购单主键
     * @return 结果
     */
    @Override
    public int deletePmsPurchaseById(Long id)
    {
        return pmsPurchaseMapper.deletePmsPurchaseById(id);
    }
}
